package ar.uba.fi.tp2Unit.displayers.xml;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

public class ErrorXML implements XMLSerializable {
	private String message;

	public ErrorXML(String message) {
		this.message = message;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
	public Node serializeXml(Document doc) {
		Element element = doc.createElement("error");
		if (this.getMessage() != null) {
			element.setTextContent(this.getMessage());
		}
		return element;
	}
}
